Skip to content

Conversation

joaosaffran
Copy link
Contributor

@joaosaffran joaosaffran commented Oct 1, 2025

This PR updates the DXContainer.rst in two ways: First, it makes sure the structures names are matching the ones in d3d12 documentation; Second, it makes sure the types match what is in the code currently.
Closes: 135210

Update RTS0 structs to match code and d3d12 docs
@llvmbot
Copy link
Member

llvmbot commented Oct 1, 2025

@llvm/pr-subscribers-backend-directx

Author: None (joaosaffran)

Changes

This PR updates the DXContainer.rst in two ways: First, it makes sure the structures names are matching the ones in d3d12 documentation; Second, it makes sure the types match what is in the code currently.


Full diff: https://github.com/llvm/llvm-project/pull/161593.diff

1 Files Affected:

  • (modified) llvm/docs/DirectX/DXContainer.rst (+13-10)
diff --git a/llvm/docs/DirectX/DXContainer.rst b/llvm/docs/DirectX/DXContainer.rst
index 17452d99e1d99..e76a7bd135848 100644
--- a/llvm/docs/DirectX/DXContainer.rst
+++ b/llvm/docs/DirectX/DXContainer.rst
@@ -530,7 +530,7 @@ but adds a 32-bit access flag.
 .. code-block:: c
 
    struct DescriptorRange_V1_0 {
-      uint32_t RangeType;
+      dxil::ResourceClass RangeType;
       uint32_t NumDescriptors;
       uint32_t BaseShaderRegister;
       uint32_t RegisterSpace;
@@ -538,12 +538,12 @@ but adds a 32-bit access flag.
    };
 
    struct DescriptorRange_V1_1 {
-      dxbc::DescriptorRangeType RangeType;
+      dxil::ResourceClass RangeType;
       uint32_t NumDescriptors;
       uint32_t BaseShaderRegister;
       uint32_t RegisterSpace;
-      uint32_t OffsetInDescriptorsFromTableStart;      
       uint32_t Flags;
+      uint32_t OffsetInDescriptorsFromTableStart;      
    };
 
 Static Samplers
@@ -556,22 +556,25 @@ This section also has a variable size, since it can contain multiple static
 samplers definitions. However, the definition is a fixed sized struct, 
 containing 13 32-byte fields of various enum, float, and integer values. 
 
+In version 1.2, the static sampler is 17 bytes. It matches the 1.0 static sampler
+but adds a 32-bit access flag. In Version 1.1, it matches static sampler 
+version 1.0.
 .. code-block:: c
 
    struct StaticSamplerDesc {
-      FilterMode Filter; 
-      TextureAddressMode AddressU;
-      TextureAddressMode AddressV;
-      TextureAddressMode AddressW;
+      dxbc::FilterMode Filter; 
+      dxbc::TextureAddressMode AddressU;
+      dxbc::TextureAddressMode AddressV;
+      dxbc::TextureAddressMode AddressW;
       float MipLODBias;
       uint32_t MaxAnisotropy;
-      ComparisonFunc ComparisonFunc; 
-      StaticBorderColor BorderColor;
+      dxbc::ComparisonFunc ComparisonFunc; 
+      dxbc::StaticBorderColor BorderColor;
       float MinLOD;
       float MaxLOD;
       uint32_t ShaderRegister;
       uint32_t RegisterSpace;
-      ShaderVisibility ShaderVisibility;
+      dxbc::ShaderVisibility ShaderVisibility;
    };
 
 SFI0 Part

@joaosaffran joaosaffran merged commit 8fd8fb4 into llvm:main Oct 3, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DirectX] Update DXContainer docs to match D3D12 naming
4 participants